<template>
  <div>
    <div
      style="font-size: 14px; line-height: 18px; color: #ffffff99; text-align: center; max-width: 220px; margin: 0 auto"
    >
      Scan with your phone to download on iOS or Android
    </div>
    <div class="install-qrcode" style="margin: 0 auto; margin-top: 24px">
      <QRCodePanle :uri="wallet.downloadUrls?.qrCode as string" ecl="M" :logo-margin="0" :logo-size="0" :size="220" />
    </div>
    <button style="margin: 0 auto; margin-top: 48px; display: block" @click="() => emits('continue')">
      Continue
    </button>
  </div>
</template>
<script setup lang="ts">
  import QRCodePanle from '../QRCode/Qrcode.vue'
  import type { WalletConnector } from '../../wallets/useWalletConnectors'

  withDefaults(
    defineProps<{
      wallet: WalletConnector
    }>(),
    {}
  )
  const emits = defineEmits(['continue'])
</script>

<style lang="scss" scoped>
  button {
    cursor: pointer;
    padding: 4px 12px;
    transition: all 0.3s ease;
    border: none;
    background: #d9fc01;
    color: #1a1b1f;
    border-radius: 24px;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: -0.05em;
    line-height: 16px;
    &:hover {
      transform: scale(1.05);
    }
    &:active {
      transform: scale(0.95);
    }
  }
  .install-qrcode {
    width: fit-content;
    background: white;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: relative;
  }
</style>
